﻿using System;
using System.Collections.Generic;
using System.Text;

using MT.eVotePRS.Model;
using MT.eVotePRS.Persistence.Interfaces;

namespace MT.eVotePRS.Persistence.MapperDao
{
    public class StudentInfoSqlMapDao : BaseMapDao, IStudentInfoDao
    {
        public object InsertStudentInfo(StudentInfo studentInfo)
        {
            return ExecuteInsert("InsertStudentInfo", studentInfo);
        }

        //public string DeleteStudentInfoById(int Id)
        //{
        //    return "";
        //}

        public int UpdateStudentInfoById(StudentInfo studentInfo)
        {
            return ExecuteUpdate("UpdateStudentInfo", studentInfo);
        }

        public StudentInfo GetStudentInfoByBarcode(string barcode)
        {
            return (ExecuteQueryForObject("QueryByBarcode", barcode) as StudentInfo);
        }

        public StudentInfo GetStudentInfoByNo(string studentNo)
        {
            return (ExecuteQueryForObject("QueryByNo", studentNo) as StudentInfo);
        }

    }
}
